package com.yin.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import lombok.Data;

/**
*@author LSY
*Time: 2018年12月26日上午11:30:08
*
*
*/
@Entity
@Table(name = "users")
@Data
public class UserEntity implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "u_id")
	private Long id;
	@Column(name = "u_username")
	@NotBlank
	@Length(min = 3, max = 6)
	private String username;
	@Column(name = "u_password")
	@Length(min = 6)
	private String password;
}
